import request from '../../utils/request';
let baseRequest_url = "http://127.0.0.1:4890/portal";
//  --------------------------------------------------------------------------------------------------------------- //
// 新闻资讯分类查询
export const findNewsCatalogList = query => {
    return request({
        url: baseRequest_url+'/admin/news/catalog/findNewsCatalogList',
        method: 'get',
		params: query,
    });
};
// 新闻资讯栏目列表分页查询
export const findNewsCatalogListPage = query => {
    return request({
        url: baseRequest_url+'/admin/news/catalog/findNewsCatalogListPage',
        method: 'get',
		params: query,
    });
};
// 新闻资讯栏目详情查询
export const findNewsCatalogInfoById = query => {
    return request({
        url: baseRequest_url+'/admin/news/catalog/findNewsCatalogInfoById/'+query,
        method: 'get',
		params: query,
    });
};
// 新增编辑新闻资讯栏目
export const addNewsCatalog = data => {
    return request({
        url: baseRequest_url+'/admin/news/catalog/saveNewsCatalog',
        method: 'post',
		data: data,
    });
};
// 新增编辑新闻资讯栏目
export const saveNewsCatalog = data => {
    return request({
        url: baseRequest_url+'/admin/news/catalog/saveNewsCatalog',
        method: 'put',
		data: data,
    });
};
// 删除新闻资讯栏目
export const deleteNewsCatalog = data => {
    return request({
        url: baseRequest_url+'/admin/news/catalog/deleteNewsCatalog/'+data,
        method: 'delete',
    });
};
// 批量删除新闻资讯栏目
export const batchDeleteNewsCatalog = data => {
    return request({
        url: baseRequest_url+'/admin/news/catalog/deleteNewsCatalog',
        method: 'delete',
		data: data,
    });
};
// 批量修改数据显示状态
export const batchIsShow = data => {
    return request({
        url: baseRequest_url+'/admin/news/catalog/batchIsShow',
        method: 'put',
		data: data,
    });
};
// 批量修改数据独立显示状态
export const batchIsSplit = data => {
    return request({
        url: baseRequest_url+'/admin/news/catalog/batchIsSplit',
        method: 'put',
		data: data,
    });
};
// 设定唯一栏目
export const setOnlyFlg = data => {
    return request({
        url: baseRequest_url+'/admin/news/catalog/setOnlyFlg',
        method: 'put',
		data: data,
    });
};
// 读取唯一栏目
export const getOnlyCatalog = () => {
    return request({
        url: baseRequest_url+'/admin/news/catalog/getOnlyCatalog',
        method: 'get',
    });
};
